if __FILE__ == $0
  # TODO Generated stub
  def facts(n)
    if n == 0
      1
    else
      n * facts(n-1)
    end
  end
  
  puts "a\nb\nc"
  puts 'a\nb\nc'
  puts "abcd #{8*3} efg"
  var = " abc "
  puts "1234#{var}5678"
  puts "foo" + "bar"
  puts "foo" * 2
  puts "foo" == "foo"
  herb = "parsley"
  puts herb[0,1]
  puts herb[-2,2]
  puts herb[-4..-1]
  
  words = ['foobar','baz','quux']
  secret = words[rand(3)]
  
  print "guess? "
  while guess = STDIN.gets
  guess.chop!
  if guess == secret
    puts "U win!"
    break
  else
    puts "Sorry, U lose."
  end
  print "guess? "
end
puts "The word was ",secret,"."
end